package com.tanger.log;

import com.tanger.common.jpa.IDEntity;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @Description TODO
 * @Author Hchenbin
 * @Date 2024-01-08 16:04
 * @Version 1.0
 */
@Data
@Entity
@NoArgsConstructor
@Api(value = "SysLog", tags= " 系统日志")
@Table(name = "tanger_sys_log")
public class SysLog extends IDEntity implements Serializable {

    @Column(columnDefinition = "varchar(50) DEFAULT '' COMMENT '模块标题'")
    @ApiModelProperty(value = "模块标题")
    private String title;
    @Column(columnDefinition = "int(11) DEFAULT '0' COMMENT '业务类型(0.其它 1.新增 2.修改 3.删除)'")
    @ApiModelProperty(value = "业务类型(0.其它 1.新增 2.修改 3.删除)")
    private Integer genre;
    @Column(columnDefinition = "varchar(100) DEFAULT '' COMMENT '方法名称'")
    @ApiModelProperty(value = "方法名称")
    private String method;
    @Column(columnDefinition = "varchar(10) DEFAULT '' COMMENT '请求方式'")
    @ApiModelProperty(value = "请求方式")
    private String resMethod;
    @Column(columnDefinition = "int(11) DEFAULT '0' COMMENT '操作类别(0.用户端 1.平台管理端)'")
    @ApiModelProperty(value = "操作类别(0.用户端 1.平台管理端)")
    private Integer operType;
    @Column(columnDefinition = "varchar(50) DEFAULT '' COMMENT '操作人员'")
    @ApiModelProperty(value = "操作人员")
    private String operName;
    @Column(columnDefinition = "varchar(255) DEFAULT '' COMMENT '请求URL'")
    @ApiModelProperty(value = "请求URL")
    private String operUrl;
    @Column(columnDefinition = "varchar(128) DEFAULT '' COMMENT '主机地址'")
    @ApiModelProperty(value = "主机地址")
    private String operIp;
    @Column(columnDefinition = "varchar(255) DEFAULT '' COMMENT '操作地址'")
    @ApiModelProperty(value = "操作地址")
    private String operLocation;
    @Column(columnDefinition = "varchar(2000) DEFAULT '' COMMENT '请求参数'")
    @ApiModelProperty(value = "请求参数")
    private String operParam;
    @Column(columnDefinition = "varchar(2000) DEFAULT '' COMMENT '返回结果'")
    @ApiModelProperty(value = "返回结果")
    private String result;
    @Column(columnDefinition = "varchar(20) DEFAULT '' COMMENT '操作状态（normal.正常 err.异常）'")
    @ApiModelProperty(value = "操作状态（err.正常 normal.异常）")
    private String status;
    @Column(columnDefinition = " bigint(20) NOT NULL COMMENT '操作时间'")
    @ApiModelProperty(value = "操作时间")
    private Long operTime;
}
